<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

	<xsl:template match="events">
		<fo:root>
			<fo:layout-master-set>
				<fo:simple-page-master master-name="event_list"
					page-height="29.7cm" page-width="21cm" margin-top="1cm"
					margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
					<fo:region-body margin-top="1cm" />
					<fo:region-before extent="2cm" />
					<fo:region-after extent="3cm" />
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="event_list">
				<fo:static-content flow-name="xsl-region-before">
					<fo:block text-align="center" font-size="8pt">
						Eventübersicht Kongresszentrum Horw / Seite
						<fo:page-number />
					</fo:block>
				</fo:static-content>
				<fo:flow flow-name="xsl-region-body">
					<fo:block space-after.optimum="20pt">
						<fo:external-graphic src="http://gastro-project.philippjenni.ch/events/logo.svg"
							border-width="0cm" width="100%" content-width="scale-to-fit" />
					</fo:block>
					<xsl:apply-templates />
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>

	<xsl:template match="event">
		<fo:table space-after.optimum="20pt" width="100%" font-size="11pt">
			<fo:table-column column-number="1" />
			<fo:table-column column-number="2" />
			<fo:table-column column-number="3" />
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="2">
						<fo:block font-size="16pt" color="#1E87C4" font-weight="900"
							text-align="left">
							<xsl:value-of select="name" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell number-rows-spanned="4" width="8cm" padding-left="0.5cm">
						<fo:block>
							<fo:external-graphic src="{picturePath}"
								border-width="0cm" width="100%" content-width="scale-to-fit" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell padding-top="8pt"
						number-columns-spanned="2" padding-bottom="10pt">
						<fo:block>
							<xsl:value-of select="description" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell>
						<fo:block>
							Beginn:
						</fo:block>
						<fo:block>
							<xsl:value-of select="from" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							Ende:
						</fo:block>
						<fo:block>
							<xsl:value-of select="to" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="2"
						padding-top="8pt">
						<fo:block>
							Max. Teilnehmer:
							<xsl:value-of select="maxRegistrations" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
</xsl:stylesheet>
